﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace RPGKata
{
    public static class Roll
    {
        public static int rolls(int attribute)
        {
            return attribute - randomNumber(0, attribute);
        }
        public static int randomNumber(int min, int max)
        {
            Random r = new Random();
            return r.Next(min, max);
        }

        public static bool isValidInt(string number) //checks to make sure the integer is valid
        {
            try
            {
                int validateNumber = int.Parse(number);
                return true;
            }
            catch
            {
                return false;
            }
        }
    }
}
